package org.correct.util;

/**
 * Node used for any singly linked list
 * 
 * @author Li Yujia
 *
 * @param <E> Type of the element stored in the node.
 */
class ListNode<E> {
	private E e;
	private ListNode<E> next;
	
	ListNode(E e, ListNode<E> next) {
		this.e = e;
		this.next = next;
	}
	
	ListNode(E e) {
		this.e = e;
		this.next = null;
	}
	
	E getElement() {
		return e;
	}
	
	void setElement(E e) {
		this.e = e;
	}
	
	ListNode<E> getNext() {
		return next;
	}
	
	void setNext(ListNode<E> next) {
		this.next = next;
	}
}
